#pragma once

#include "ArConfig.hpp"

#ifdef ARIA_DEBUG
#	define _CRTDBG_MAP_ALLOC
#	include <stdlib.h>
#	include <crtdbg.h>
#endif

#include <stdlib.h>
#include <string.h>

//////////////////////////////////////////////////////////////////////////

namespace Aria
{
	typedef signed char SByte;
	typedef unsigned char Byte;
	typedef signed short Int16;
	typedef unsigned short UInt16;
	typedef signed int Int32;
	typedef unsigned int UInt32;
	typedef signed long long Int64;
	typedef unsigned long long UInt64;
#ifdef ARIA_X86
	typedef Int32 NativeInt;
	typedef UInt32 NativeUInt;
#elif defined(ARIA_X64)
	typedef Int64 NativeInt;
	typedef UInt64 NativeUInt;
#endif

	typedef char AChar;
	typedef wchar_t UChar;
}

//////////////////////////////////////////////////////////////////////////

#define ArOffsetOf(class_, member) (reinterpret_cast<NativeUInt>(&reinterpret_cast<class_ *>(1)->member) - 1)